﻿#region Styx Namespaces
using Styx;
using Styx.CommonBot;
using Styx.CommonBot.Routines;
#endregion

namespace GiwinMonk
{
    public partial class Monk : CombatRoutine
    {

        /// <summary>
        /// Cost: 1 Chi |
        /// Range: 5 Yards |
        /// Cast Time: Instant |
        /// GCD: 1 Second |
        /// http://www.wowhead.com/spell=100787
        /// </summary>


        public bool TigerPalm()
        {
            return (MIRsettings.Instance.TigerPalm) && 
                (StyxWoW.Me.CurrentTarget != null) &&
                   (StyxWoW.Me.CurrentTarget.IsWithinMeleeRange) &&
                   (Helpers.Unit.HasMyAura(StyxWoW.Me, "Combo Breaker: Tiger Palm") ||
                    StyxWoW.Me.CurrentChi >= 1) &&
                   (!Helpers.Unit.HasMyAura(StyxWoW.Me, "Tiger Palm")) ||
                   (StyxWoW.Me.ActiveAuras["Tiger Palm"] != null &&
                    Helpers.Unit.HasMyAura(StyxWoW.Me, "Tiger Palm", 1)) ||
                   (StyxWoW.Me.ActiveAuras["Tiger Palm"] != null &&
                    Helpers.Unit.HasMyAura(StyxWoW.Me, "Tiger Palm", 2)) ||
                   (StyxWoW.Me.ActiveAuras["Tiger Palm"] != null &&
                    Helpers.Unit.HasMyAura(StyxWoW.Me, "Tiger Palm", 3) &&
                    StyxWoW.Me.ActiveAuras["Tiger Palm"].EndTime < 10) &&
                   (CanCast("Tiger Palm"));

        }
    }
}